import { reactive } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
import { DICT_TYPE } from '@/utils/dict'
const { t } = useI18n() // 国际化
// 表单校验
export const rules = reactive({
    rTime: [{ required: true, message: "时间不能为空", trigger: "blur" }],
})
// CrudSchema
const crudSchemas = reactive<CrudSchema[]>([
    {
      label: '编号',
      field: 'id',
      type: 'index',
      form: {
         show: false
      },
      detail: {
         show: false
      }
    },
    {
      label: '时间',
      field: 'rTime',
      form: {
          show: true,
          component: 'DatePicker',
          componentProps: {
              type: 'datetime',
              valueFormat: 'YYYY-MM-DD HH:mm:ss'
          }
      },
      search: {
         show: true,
         component: 'DatePicker',
         componentProps: {
             type: 'datetimerange',
             valueFormat: 'YYYY-MM-DD HH:mm:ss'
         }
      }
    },
    {
      label: '旧西水东调DN1200',
      field: 'a1',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '四林DN1400 ',
      field: 'a2',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '新西水东调DN1600',
      field: 'a3',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'QL东部原水',
      field: 'a4',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '至一期平流池',
      field: 'a5',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '78平流池',
      field: 'a6',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN2000出厂水',
      field: 'a7',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1800出厂水',
      field: 'a8',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '汇水井至一期加矾',
      field: 'a9',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '78平流池加矾',
      field: 'a10',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '78平流池加氯',
      field: 'a11',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '总平流池滤前加氯',
      field: 'a12',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后加氯',
      field: 'a13',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1＃吸水井加氯',
      field: 'a14',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2＃吸水井加氯',
      field: 'a15',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#高压进线柜电度',
      field: 'a16',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#高压进线柜电度',
      field: 'a17',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1期1#干式变压器电度',
      field: 'a18',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1期2#干式变压器电度',
      field: 'a19',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2期3#干式变压器电度',
      field: 'a20',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2期4#干式变压器电度',
      field: 'a21',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#送水泵电度',
      field: 'a22',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#送水泵电度',
      field: 'a23',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#送水泵电度',
      field: 'a24',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#送水泵电度',
      field: 'a25',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#送水泵电度',
      field: 'a26',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '6#送水泵电度',
      field: 'a27',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '8#送水泵电度',
      field: 'a28',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '办公室总进线电度',
      field: 'a29',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '机修间电度',
      field: 'a30',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '停车场充电桩电度',
      field: 'a31',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '低压照明电度',
      field: 'a32',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '高压照明电度',
      field: 'a33',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '一期办公用电电度',
      field: 'a34',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '一期LNG用电电度',
      field: 'a35',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1200进水累计',
      field: 'a36',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1200进水',
      field: 'a37',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1400进水累计',
      field: 'a38',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1400进水',
      field: 'a39',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1600进水累计',
      field: 'a40',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: 'DN1600进水',
      field: 'a41',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '平流池进水流量计读数',
      field: 'a42',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '平流池进水流量',
      field: 'a43',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '至一期流量累计',
      field: 'a44',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '至一期流量',
      field: 'a45',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '回收水池累计流量',
      field: 'a46',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '回收水池流量',
      field: 'a47',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#出厂水累计流量',
      field: 'a48',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#出厂水流量',
      field: 'a49',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#出厂水累计流量',
      field: 'a50',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#出厂水流量',
      field: 'a51',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水氨氮',
      field: 'a52',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水总锰',
      field: 'a53',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水浊度',
      field: 'a54',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水PH',
      field: 'a55',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水COD',
      field: 'a56',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水浊度',
      field: 'a57',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水PH',
      field: 'a58',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水氨氮',
      field: 'a59',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水总锰',
      field: 'a60',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '原水COD',
      field: 'a61',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '7#沉淀池出水浊度',
      field: 'a62',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后水浊度',
      field: 'a63',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后水余氯',
      field: 'a64',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#出厂水浊度',
      field: 'a65',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#出厂水余氯',
      field: 'a66',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#出厂水PH值',
      field: 'a67',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#出厂水浊度',
      field: 'a68',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#出厂水余氯',
      field: 'a69',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#出厂水PH值',
      field: 'a70',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#出厂水压力',
      field: 'a71',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#出厂水压力',
      field: 'a72',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后汇水渠液位',
      field: 'a73',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后出水液位',
      field: 'a74',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#回收池液位',
      field: 'a75',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#回收池液位',
      field: 'a76',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#清水池液位',
      field: 'a77',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '6#清水池液位',
      field: 'a78',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '7#清水池液位',
      field: 'a79',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '8#清水池液位',
      field: 'a80',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '吸水井液位',
      field: 'a81',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '矾溶液池溶液比重',
      field: 'a82',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#矾溶液池液位',
      field: 'a83',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#矾溶液池液位',
      field: 'a84',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#矾溶液池液位',
      field: 'a85',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#矾液投加量',
      field: 'a86',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#矾液投加量',
      field: 'a87',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#矾液投加量',
      field: 'a88',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#矾液投加量',
      field: 'a89',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#矾液投加量',
      field: 'a90',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '总矾耗量',
      field: 'a91',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '单位矾耗',
      field: 'a92',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '次氯酸钠浓度',
      field: 'a93',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#次氯酸钠储液罐液位',
      field: 'a94',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#次氯酸钠储液罐液位',
      field: 'a95',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#次氯酸钠储液罐液位',
      field: 'a96',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#次氯酸钠储液罐液位',
      field: 'a97',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#次氯酸钠储液罐液位',
      field: 'a98',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '6#次氯酸钠储液罐液位',
      field: 'a99',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '7#次氯酸钠储液罐液位',
      field: 'a100',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '8#次氯酸钠储液罐液位',
      field: 'a101',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#加氯流量',
      field: 'a102',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#加氯流量',
      field: 'a103',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#加氯流量',
      field: 'a104',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#加氯流量',
      field: 'a105',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#加氯流量',
      field: 'a106',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '6#加氯流量',
      field: 'a107',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '7#加氯流量',
      field: 'a108',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '8#加氯流量',
      field: 'a109',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '总次氯酸钠耗量',
      field: 'a110',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '单位次氯酸钠耗量',
      field: 'a111',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '78#加矾累计流量',
      field: 'a112',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '78#加矾流量',
      field: 'a113',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '至一期加矾累计流量',
      field: 'a114',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '至一期加矾流量',
      field: 'a115',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '沉淀池前加氯累计流量',
      field: 'a116',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '沉淀池前加氯流量',
      field: 'a117',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后加氯累计流量',
      field: 'a118',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '滤后加氯流量',
      field: 'a119',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '911有功电能表',
      field: 'a120',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '911有功电能',
      field: 'a121',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '912有功电能表',
      field: 'a122',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '912有功电能',
      field: 'a123',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1期1#干式变压器有功电能表',
      field: 'a124',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1期1#干式变压器有功电能',
      field: 'a125',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1期2#干式变压器有功电能表',
      field: 'a126',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1期2#干式变压器有功电能',
      field: 'a127',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#干式变压器有功电能表',
      field: 'a128',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#干式变压器有功电能',
      field: 'a129',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#干式变压器有功电能表',
      field: 'a130',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#干式变压器有功电能',
      field: 'a131',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#电机有功电能表',
      field: 'a132',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '1#电机有功电能',
      field: 'a133',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#电机有功电能表',
      field: 'a134',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '2#电机有功电能',
      field: 'a135',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#电机有功电能表',
      field: 'a136',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '3#电机有功电能',
      field: 'a137',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#电机有功电能表',
      field: 'a138',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '4#电机有功电能',
      field: 'a139',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#电机有功电能表',
      field: 'a140',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '5#电机有功电能',
      field: 'a141',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '6#电机有功电能表',
      field: 'a142',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '6#电机有功电能',
      field: 'a143',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '8#电机有功电能表',
      field: 'a144',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '8#电机有功电能',
      field: 'a145',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '备用',
      field: 'a146',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '备用',
      field: 'a147',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '备用',
      field: 'a148',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '备用',
      field: 'a149',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '备用',
      field: 'a150',
      form: {
          show: true,
      },
      search: {
         show: true
      }
    },
    {
      label: '创建时间',
      field: 'createTime',
      form: {
         false
      },
      search: {
         show: true,
         component: 'DatePicker',
         componentProps: {
             type: 'datetimerange',
             valueFormat: 'YYYY-MM-DD HH:mm:ss'
         }
      }
    },
    {
        label: t('table.action'),
        field: 'action',
        width: '240px',
        form: {
            show: false
        },
        detail: {
            show: false
        }
    }
])

export const { allSchemas } = useCrudSchemas(crudSchemas)